<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragments::head(~{::title})">
    <title>后台分类新增</title>
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css">
</head>

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="../../static/js/semantic.min.js" th:src="@{/js/semantic.min.js}"></script>
<body>
    <!--导航 -->
    <nav th:replace="admin/_fragments::menu(2)" class="ui inverted attached segment mine-padded-tb-mini">
    </nav>
    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a href="#" class="item active">发布</a>
                <a href="#" class="teal  item">列表</a>
            </div>
        </div>
    </div>
    <!-- 中间内容 -->
    <div class="mine-container mine-padded-tb-large">
        <div class="ui container">
            <form action="#" th:action="@{/admin/types/add}" method="post" class="ui form">
                <div class="field">
                    <div class="ui left labeled input">
                        <label class="ui teal basic label">名称</label>
                        <input type="text" name="name" th:value="${type}!=null ? ${type.name}" placeholder="分类名称">
                        <input type="hidden" name="id" th:value="${type}!=null ? ${type.id}">
                    </div>
                </div>
                <div class="ui right aligned container">
                    <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button>
                    <button class="ui teal button" type="submit">提交</button>
                </div>

            </form>
        </div>
    </div>
    <!-- 底部 -->
    <footer th:replace="admin/_fragments::footer" class="ui inverted vertical segment mine-padded-tb-massive">
    </footer>
    <script>
        $('.ui.dropdown').dropdown({
            on : 'hover'
        });
    </script>
</body>
</html>